%% ********** RQS *************
% Version: 0.1
% Rail Quasi Statics (RQS) is intended for researchers from both academia
% and the industrie. It 'simulates' the run of a train over a given track
% with a given speed profile. 
%% =========== Possible output ===========
% * Lateral forces of per axle (important for track shift)
% * Y/Q the derailment ratio (compare with Nadal's criterion)
% * DQ/Q the wheel unoading (often a limnit of 0.5 is accepted)
% * The forces in the couplers
% * The angles in the couplers
%% =========== The algorith accounts for: ===========
% * Lateral forces due to centrifugal forces and gravity
% * Lateral forces due to the yaw angle rate (derived from the track
%   curvature)
% * Lateral forces due to the couplers (through the couplers angle, see publication below)
% * Vertical forces due to centrifugal forces and gravity
% * Vertical forces due to car body pitch (due to traction, coupler and
%   acceleration forces). 
% * Vertical forces due to bogie pitch (hereby the inertia of the bogie is
%   ignored, but the traction forces on the wheels and the traction rods are
%   accounted for)
% ** Each (distance) step of the calculation the accelerations are
% calculated again based on the track and vehicle profile accounting for
% the phenomena mentioned above. Within each step all acceleration are
% assumed to constant: the quasi static approach.
%% =========== How to run the calculation ===========
% 1.  Run RQS_input.m to create an input file for RQS.
% 2a. With Matlab: run RQS_0_1.m  or call RQS_main.p from the command window
% 2b. Without a Matlab license: contact me, there might be a solution.
% 3.  Analyse and try to improve the world's railway systems.
% 4.  When publishing do not forget to cite
%% =========== Disclaimer ===========
% *  Although the software has been created with care the author does not
%    accept responsability any results obtained with this software. 
% *  This is an amateur software and as such it has not been made fool
%    proof
% *  I am open for feed back, both for bug notices as for suggestions for
%    improvement/expansion. But please be aware my time is limited and that
%    I cannot fulfil all your wishes ;)
% *  If you write me, please use a clear email subject and state your name,
%    country, institution/company and purpose.
%% =========== Credits ===========
%When using this software for publications, please cite: 
%Nico Burgelman, Zili Li, and Rolf Dollevoet. 
%"Fast estimation of the derailment risk of a braking train in curves and turnouts." 
%International journal of heavy vehicle systems 23.3 (2016): 213-229.

%Made by Nico Burgelman (nicoburgelman@gmail.com), August 2016